home *** CD-ROM | disk | FTP | other *** search
/ Aminet 49 / Aminet 49 (2002)(GTI - Schatztruhe)[!][Jun 2002].iso / Aminet / util / rexx / Pixload-1.70.lha / Pixload-1.70 / Pixload < prev    next >
Text File  |  1994-04-17  |  3KB  |  145 lines

  1. /**/
  2.  
  3. call init
  4. call CreateApp(f)
  5. call HandleApp
  6.  
  7. /*never reached */
  8. /**********************************************************************/
  9. init: procedure expose global.
  10.  
  11.     l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  12.     if AddLibrary("rxmui.library")~=0 then exit
  13.     call rxmuiopt("debugmode showerr")
  14.     return
  15. /***********************************************************************/
  16. HandleApp: procedure expose prog.
  17.  
  18.     ctrl_c=2**12
  19.     do forever
  20.         call NewHandle("app","h",ctrl_c)
  21.         if and(h.signals,ctrl_c)>0 then exit
  22.         select
  23.             when h.event="QUIT" then exit
  24.             otherwise interpret h.event
  25.         end
  26.     end
  27. /* never reached */
  28. /***********************************************************************/
  29. CreateApp: procedure expose prog.
  30.  
  31.  
  32.     open(chemin,"Pixload:Prefs/Pixload.prefs",'Read')
  33.  
  34.     num=0
  35.     icones=readln(chemin)
  36.     large=readln(chemin)
  37.  
  38.     do while ~EOF(chemin)
  39.  
  40.            script=readln(chemin)
  41.            fichier=readln(chemin)
  42.  
  43.     if fichier~="" then do
  44.  
  45.        if script~==1 then prog.num="address command 'wbrun "||fichier||"'"
  46.        else prog.num="address command 'execute "||fichier||"'"
  47.  
  48.     end
  49.  
  50.        bull=readln(chemin)
  51.  
  52.        if bull~="" then bulle.num=bull
  53.        else bulle.num="???"
  54.  
  55.        num=num+1
  56.  
  57.     end
  58.  
  59.     call close(chemin)
  60.  
  61.     app.Title="Pixload"
  62.     app.Version="$VER: Pixload 1.70"
  63.     app.Author="Pixel Art - www.Pixel-Art.fr.st"
  64.     app.Description="Programs loading bar"
  65.     app.SubWindow="win"
  66.     app.Base="Pixload"
  67.  
  68.      win.Class="BWin"
  69.      win.nohide=1
  70.      win.nosizegadget=1
  71.      win.saveitems=1
  72.  
  73.      win.ID="MAIN"
  74.  
  75.      win.borderless=1
  76.      win.closegadget=0
  77.      win.sizegadget=0
  78.  
  79.      win.Contents="mgroup"
  80.  
  81.      mgroup.0="speedbar"
  82.  
  83.          speedbar.class="speedbar"
  84.          speedbar.horiz=large
  85.          speedbar.RaisingFrame=1
  86.          speedbar.Borderless=1
  87.          speedbar.viewmode="GFX"
  88.          speedbar.imagesdrawer="Pixload:icones"
  89.          speedbar.sunny=0
  90.  
  91.          do i=0 to icones-1
  92.  
  93.             speedbar.i.Img=i
  94.             speedbar.i.Help=bulle.i
  95.  
  96.          end
  97.  
  98.          speedbar.icones.Img=8
  99.          speedbar.icones.Help="Prefs's Pixload"
  100.  
  101.          fin=icones+1
  102.  
  103.          speedbar.fin.Img=9
  104.          speedbar.fin.Help="Quit Pixload"
  105.  
  106.       if NewObj("application","app")>0 then exit
  107.  
  108.       do i=0 to icones-1
  109.          call sbNotify("speedbar",i,"pressed",1,"app","Return","call dofun("i")")
  110.       end
  111.  
  112.     call sbNotify("speedbar",icones,"pressed",1,"app","Return","call prefs")
  113.     call sbNotify("speedbar",icones+1,"pressed",1,"app","Return","call fin")
  114.     call set("win","open",1)
  115.  
  116.  
  117. return
  118. /* --------------------------------------------------- */
  119. dofun: procedure expose prog.
  120.  
  121.     parse arg a
  122.  
  123.     cmd=prog.a
  124.     interpret cmd
  125.  
  126. return
  127. /* ----------- */
  128. fin: procedure
  129.  
  130.     address command 'copy ram:env/mui/pixload.1.prefs to sys:prefs/env-archive/mui/'
  131.     exit
  132.  
  133. return
  134. /* --------------------------------------------*/
  135. prefs:
  136.  
  137.     cmd="address command 'wbrun sys:prefs/pixload-prefs'"
  138.     interpret cmd
  139.  
  140. return
  141. /* -------- */
  142. halt:
  143.     break=_c:
  144.     exit
  145.